//
//  BaseViewModel.m
//  WhiteNoise
//
//  Created by 王亮 on 2020/8/11.
//  Copyright © 2020 liang. All rights reserved.
//

#import "TestViewModel.h"

@implementation TestViewModel
- (instancetype)init
{
    self = [super init];
    if (self) {
        NSLog(@"1234");
        [self getData];
    }
    return self;
}
-(void)getData{
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        self.dataArr = [NSArray arrayWithObjects:@"12",@"23",@"34", nil];
        [self.data_reload sendNext:@"1"];
    });
}

-(RACSubject *)data_reload{
    if(!_data_reload){
        _data_reload = [RACSubject subject];
    }
    return _data_reload;
}
@end
